package com.bjx.api.flow.service;

import com.bjx.api.flow.domain.vo.FlowDisposeVO;
import com.bjx.api.flow.service.fallback.RemoteFlowFallBack;
import com.bjx.common.core.constant.ServiceNameConst;
import com.bjx.common.core.domain.R;
import com.bjx.common.security.interceptor.FeignInterceptor;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @desc: 远程任务审批
 * @author: liushuai
 * @date: 2023/1/10 13:39
 */
@FeignClient(name = ServiceNameConst.FLOW,fallback = RemoteFlowFallBack.class,path = "/task",configuration = FeignInterceptor.class)
public interface RemoteTaskDisposeService {

    /**
     * 审批通过
     * @param flowDisposeVO
     * @return: com.bjx.common.core.domain.R<java.lang.String>
     * @Author: liushuai
     * @Date: 2023/1/10 13:43
     */
    @PostMapping("/pass")
    R<String> pass(@RequestBody FlowDisposeVO flowDisposeVO);


    /**
     * 审批拒绝
     * @param flowDisposeVO
     * @return: com.bjx.common.core.domain.R<java.lang.String>
     * @Author: liushuai
     * @Date: 2023/1/10 13:45
     */
    @PostMapping("/reject")
    @Operation(summary = "审批拒绝")
    R<String> reject(@RequestBody  FlowDisposeVO flowDisposeVO);
}
